package architecture;

public class Mips{
	static class MyInteger{
		int i;
		public String toString(){
			return Integer.toString(i);
		}
	}
	static class A{
		MyInteger aa;
		MyInteger aa0;
		void set(MyInteger aaa){
			aa0=aaa;
		}
		void compute(boolean flag){
			if(flag) aa=new MyInteger();
			aa.i=aa0.i+1;
		}
		MyInteger get(){
			return aa;
		}
		A(){
			
		}
	}
	static class B{
		MyInteger bb;
		MyInteger bb0;
		void set(MyInteger bbb){
			bb0=bbb;
		}
		void compute(boolean flag){
			if(flag) bb=new MyInteger();
			bb.i=bb0.i-1;
		}
		MyInteger get(){
			return bb;
		}
		B(){
			
		}
	}
	public static void main(String args[]){
		/*A ac=new A();
		B bc=new B();
		
		MyInteger my=new MyInteger();
		my.i=0;
		ac.set(my);
		ac.compute(true);
		bc.set(ac.get());
		bc.compute(true);
		
		MyInteger ur=new MyInteger();
		ur.i=10;
		ac.set(ur);
		ac.compute(false);
		bc.compute(false);
		Integer a=0;
		System.out.println(ac.aa0);
		System.out.println(ac.aa);
		System.out.println(bc.bb0);
		System.out.println(bc.bb);*/
	}
}